﻿{% extends "base.html" %}


{% block css %}
<link rel="stylesheet" href="/static/css/admin.css">
<link rel="stylesheet" href="/static/ztree3/css/bootstrapStyle/bootstrapStyle.css" type="text/css">
{% endblock %}


{% block center %}


<!--头部导航-->
<div class="panel panel-default center-top" style="min-width:1300px;">
  <div class="panel-body">
    <ol class="breadcrumb" style="margin-bottom: 0px;background-color: #FFFFFF;">
      <li><a href="/" style="color: #377CD8;">首页</a></li>
      <li><a href="javascript:;">资产信息</a></li>
      <li class="active">{{ title }}</li>
    </ol>
  </div>
</div>



<!--用户信息-->
<div class="panel panel-default center-top" style="min-width:1300px;">
  <div class="panel-heading">
      <div class="row" style="padding-top:5px;padding-left:10px;">
          <div class="col-sm-6">

              <a href="javascript:;" class="btn btn-sm btn-success" data-toggle="modal" data-target="#supplierModal"> 添加厂商 </a>

          </div>
      </div>

  </div>
  <div class="panel-body">


        <div style="margin-bottom: 10px;">

            <div class="col-sm-12">
                <table class="table table-hover table-bordered">
                  <thead>
                    <tr style="background-color: #f5f5f5;">
                      <th>厂商</th>
                      <th>负责人</th>
                      <th>电话号码</th>
                      <th>邮箱地址</th>
                      <th>操作</th>
                    </tr>
                  </thead>
                  <tbody>

                  {% for info in supplier_obj %}
                    <tr name="tbody">

                      <td>{{ info.supplier }}</td>
                      <td>{{ info.supplier_head }}</td>
                      <td>{{ info.supplier_head_phone }}</td>
                      <td>{{ info.supplier_head_email }}</td>
                      <td style="padding-left:5px;">

                        <a href="javascript:;" style="text-decoration:none;" supplier_id="{{ info.id }}" name="edit-supplier" data-toggle="tooltip" data-placement="left" title="修改"><span class="fa fa-pencil"></span> </a>&nbsp;&nbsp;&nbsp;

                        <a href="javascript:;" style="text-decoration:none;" supplier_id="{{ info.id }}" name="del-supplier" data-toggle="tooltip" data-placement="right" title="删除"><span class="fa fa-trash"></span> </a>

                      </td>
                    </tr>
                  {% endfor %}
                  </tbody>
                </table>

                <div class="text-right" style="margin-top:-30px;padding-right:9%">
                  <ul class="pagination" id="pagination">
                  </ul>
                </div>

            </div>

        </div>
  </div>
</div>


{% endblock %}


<!-- Modal -->
{% block modal %}

<div class="modal fade" id="supplierModal" tabindex="-1" role="dialog" aria-labelledby="supplierModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content" style="margin-top:135px;">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="supplierModalLabel">添加供应商</h4>
      </div>
      <div class="modal-body">

          <div class="form-group">
            <label >供应商</label>
            <input  class="form-control"  placeholder="描述" id="supplier">
          </div>
          <div class="form-group">
            <label >负责人</label>
            <input  class="form-control"  placeholder="描述" id="supplier-head">
          </div>

          <div class="form-group">
            <label >电话号码</label>
            <input  class="form-control"  placeholder="描述" id="supplier-head-phone">
          </div>

          <div class="form-group">
            <label >邮箱地址</label>
            <input  class="form-control"  placeholder="描述" id="supplier-head-email">
          </div>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="sub-supplier">提交</button>
      </div>
    </div>
  </div>
</div>


<div class="modal fade" id="edit-supplierModal" tabindex="-1" role="dialog" aria-labelledby="edit-supplierModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content" style="margin-top:135px;">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="edit-supplierModalLabel">修改供应商</h4>
      </div>
      <div class="modal-body">

          <div class="form-group">
            <label >供应商</label>
            <input  class="form-control"  placeholder="描述" id="edit-supplier">
          </div>
          <div class="form-group">
            <label >负责人</label>
            <input  class="form-control"  placeholder="描述" id="edit-supplier-head">
          </div>

          <div class="form-group">
            <label >电话号码</label>
            <input  class="form-control"  placeholder="描述" id="edit-supplier-head-phone">
          </div>

          <div class="form-group">
            <label >邮箱地址</label>
            <input  class="form-control"  placeholder="描述" id="edit-supplier-head-email">
          </div>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="sub-edit-supplier">提交</button>
      </div>
    </div>
  </div>
</div>

{% endblock  %}

{% block js %}
    <script type="text/javascript" src="/static/js/asset_v2.js"></script>

    <script type="text/javascript" >

    </script>

{% endblock %}


